package cn.org.alan.exam.mapper;

import cn.org.alan.exam.model.entity.Job;
import cn.org.alan.exam.model.vo.job.StudentJobPageVo;
import cn.org.alan.exam.model.vo.job.TeacherJobPageVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;

/**
 * 说明：
 *
 * @Author Alan
 * @Version 1.0
 * @Date 2025/4/3 9:37 PM
 */
@Mapper
public interface JobMapper extends BaseMapper<Job> {
    /**
     * 教师分页查询作业
     * @param page
     * @param userId
     * @param title
     * @param gradeId
     * @return
     */
    Page<TeacherJobPageVo> getTeacherJobPage(Page<TeacherJobPageVo> page, Integer userId, String title, Integer gradeId);

    /**
     * 学生分页查找作业 根据班级id
     *
     * @param page
     * @param gradeId
     * @param title
     * @param userId
     * @return
     */
    Page<StudentJobPageVo> getStudentJobPage(Page<StudentJobPageVo> page, Integer gradeId, String title, Integer userId);
}
